import { useDispatch } from "react-redux";
import { showToast } from "@/store/toastSlice";
export default function useToast() {
    const dispatch = useDispatch();
    return (text: string, type: 'success' | 'err') => {
        dispatch(showToast({ text, type }))
    }
}